Fixes URLError messages appearing in the built documentation
Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: not-needed (upstream fixed this in _cache_it instead)
Gbp-Pq: Name python3_dataset_caching.patch
# Python 3 build
import zlib
data = zlib.decompress(open(cache_path, 'rb').read())
- # return as bytes object encoded in utf-8 for cross-compat of cached
- data = cPickle.loads(data).encode('utf-8')
+ # treat Python 2 strings as bytes for cross-compat of cached
+ data = cPickle.loads(data, encoding='bytes')
else:
data = open(cache_path, 'rb').read().decode('zip')
data = cPickle.loads(data)